/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Utilities;

namespace VOL.demo.IServices
{
    public partial interface IInventoryModelService : IService<InventoryModel>
    {
        /// <summary>
        /// 根据货品ID获取库存信息
        /// </summary>
        /// <param name="goodsId">货品ID</param>
        /// <returns></returns>
        List<InventoryModel> GetInventoryByGoodsId(long goodsId);

        /// <summary>
        /// 根据仓库ID获取库存信息
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
        /// <returns></returns>
        List<InventoryModel> GetInventoryByWarehouseId(long warehouseId);

        /// <summary>
        /// 验证库存上下限
        /// </summary>
        /// <param name="upperLimit">库存上限</param>
        /// <param name="lowerLimit">库存下限</param>
        /// <returns></returns>
        WebResponseContent ValidateInventoryLimits(int? upperLimit, int? lowerLimit);

        /// <summary>
        /// 批量设置库存上下限
        /// </summary>
        /// <param name="inventoryIds">库存ID列表</param>
        /// <param name="upperLimit">库存上限</param>
        /// <param name="lowerLimit">库存下限</param>
        /// <returns></returns>
        WebResponseContent BatchSetInventoryLimits(List<long> inventoryIds, int? upperLimit, int? lowerLimit);

        /// <summary>
        /// 保存库存信息
        /// </summary>
        /// <param name="inventory">库存信息</param>
        /// <returns></returns>
        WebResponseContent SaveInventory(InventoryModel inventory);
    }
}
